home *** CD-ROM | disk | FTP | other *** search
- 1 ;SRCH DSK 2
- 5 RDDSK JSR STP;CHECK RUN/STOP KEY
- 10 LDA #$08
- 20 JSR LIST
- 30 LDY #$00
- 40 LP3 LDA MR1,Y;READ BYTES $0302 TO 03FF IN 1541 RAM
- 50 JSR OUT
- 60 INY
- 70 CPY #$06
- 80 BNE LP3
- 90 JSR UNLIS
- 100 LDA #$08
- 110 JSR TALK;SET UP DISK TO SEND BYTES ON SERIAL BUS
- 120 LDY #$02
- 125 NEWIN LDX #$00:STX X;SET SPARE X TO 0
- 130 NEXTIN JSR IN;GET A BYTE FROM SERIAL BUS
- 135 INY:CPY #$FF:BEQ LP6;BRANCH ALL BYTES READ
- 140 LDX X;HOLDS COUNT OF BYTES FOUND
- 150 CMP SRCH,X;HOLDS BYTES SEARCHING FOR
- 160 BNE NEWIN;NO MATCH TRY AGAIN
- 170 INX:CPX STRING:BEQ PRTDATA;IF X = LENGTH OF SEARCH
- 171 ;STRING THEN ALL FOUND PRINT IT!!
- 180 STX X;IF NOT KEEP TRACK OF HOW MANY FOUND
- 190 JMP NEXTIN;GET ANOTHER BYTE
- 200 PRTDATA JSR UNTLK
- 210 JMP PRNTDATA;ROUTINE TO PRINT TRK & SEC TO SCREEN
- 220 LP6 JSR UNLIS
- 230 JMP INCR;DEC SEC # AND INC TRK #
- 240 STP JSR STOP
- 250 BNE NOSTOP;RUN/STOP KEY NOT PRESSED
- 260 JMP END;KEY PRESSED TERMINATE
- 270 NOSTOP RTS
- 280 .FILE SRCH DSK 3
-